var listHtml;
var pageHtml;
var listObject=null;
var pageObject=null;
var bodyHtmls;
function setList(htmlObj,typeObj){
	var grabid=$("#grabid").val();
	if(htmlObj!=null){
		if(typeObj=="liebiao"){
			listObject=htmlObj;
			listHtml=htmlObj.html();
			bodyHtmls=$("html").html();
			$.post("/manage_grab_ajax.ad",{parameter:"addListDna",id:grabid,list_dna:listHtml,pageHtml:bodyHtmls},function(data){
				parent.window.location.href="/manage_grab.ad?parameter=configList&id="+grabid;
			})
		}else{
			pageObject=htmlObj;
			pageHtml=htmlObj.html();
			alert("分页信息入库....");
		}
	}else if(htmlObj==null&&typeObj==null){
		listHtml=null;
		pageHtml=null;
		listObject.css("border","none");
		pageObject.css("background-color","");
		alert("已经取消标注....");
	}else{
		alert("请选择有效区域");
	}/*
	if(obj!=null){
		var listHtml=obj.html();
		jQuery.post('/manage_grab_ajax.ad',{parameter:'setList',list:listHtml},function(data){
			
			
		});
	}*/
}

//��ʼִ��
/*
jQuery.noConflict();

jQuery(function(){
	jQuery('div').bind("mouseenter",function(){
		jQuery('div').css("border","none");
		jQuery('div').css("background-color","");
		jQuery('div').bind("click", function(){
		});
		jQuery(this).css("border","1px solid green");
		jQuery(this).css("background-color","yellow");
		jQuery(this).bind("click", function(event){
			event.stopPropagation();
			//alert(jQuery(this).html());
			setList(jQuery(this));
		});
	});
	
	jQuery('div').bind("mouseleave",function(){
		jQuery(this).css("border","none");
		jQuery(this).css("background-color","");
	});
});
*/

function caiji(obj){
		jQuery('.selected_list').mouseenter(function(){
			jQuery(this).css("border","none");
			jQuery(this).css("background-color","red");
			jQuery(this).click( function(event){
				jQuery(this).css("border","1px solid green");
				jQuery(this).css("background-color","yellow");
				event.stopPropagation();
				//alert(jQuery(this).html());
				setList(jQuery(this),obj);
			});
		});
		jQuery('.selected_list').bind("mouseleave",function(){
			jQuery(this).css("border","1px solid green");
			jQuery(this).css("background-color","yellow");
		});
}
